# 创建时间：2025/5/1 星期四 10:40
# 创建人：李德才
t = ("hello", "world", "python")
print(t[0])
print(t[1])
print(t[2])
## print(t[3]) # 报错 IndexError: tuple index out of range
print("循环遍历元组")
for i in t:
    print(i)

print(t.count("hello"))
print(t.index("python"))
print(t.index("world", 1, 2))
print(t.index("aaa")) ##  报错 ValueError: tuple.index(x): x not in tuple